package com.jlesbegu.arkanoid;

import android.graphics.Bitmap;
import android.view.View;

public class Brick {

	public static final int DEFAULT_WIDTH = 30;
	public static final int DEFAULT_HEIGHT = 20;

	private int xLeft;
	private int yTop;
	private int width;
	private int height;

	private Bonus bonus;

	private Bitmap bitmap;

	//	private Context context;
	//	
	//	private ImageView imageView;

	private View view;

	public Brick(int x, int y, int w, int h, Bonus bonus, View view, Bitmap bitmap){

		this.bonus = bonus;
		this.height = h;
		this.width = w;
		this.xLeft = x;
		this.yTop = y;
		this.view = view;
		this.bitmap = bitmap;

	}
	public Brick(int x, int y, Bonus bonus, View view, Bitmap bitmap){

		this.bonus = bonus;
		this.height = DEFAULT_HEIGHT;
		this.width = DEFAULT_WIDTH;
		this.xLeft = x;
		this.yTop = y;
		this.view = view;
		this.bitmap = bitmap;

	}

	public void destroy(){

//		Animation myFadeOutAnimation = AnimationUtils.loadAnimation(this.view.getContext(), R.anim.fadeout);
//
//		View v = this.view.findViewById(R.drawable.cubedecor);
//		if(v!=null){
//			v.startAnimation(myFadeOutAnimation);
//		}
	}


	public int getxLeft() {
		return xLeft;
	}

	public void setxLeft(int xLeft) {
		this.xLeft = xLeft;
	}

	public int getyTop() {
		return yTop;
	}

	public void setyTop(int yTop) {
		this.yTop = yTop;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public Bonus getBonus() {
		return bonus;
	}

	public void setBonus(Bonus bonus) {
		this.bonus = bonus;
	}





	public Bitmap getBitmap() {
		return bitmap;
	}





	public void setBitmap(Bitmap bitmap) {
		this.bitmap = bitmap;
	}

}
